From 6bcb4f310ff4e63d02a1c3df073de264566f7eef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Florian=20M=C3=BCllner?= Date: Thu, 13 Jul 2023 19:04:20 +0200 Subject: [PATCH] popupMenu: Hide ornament by default We have always defaults to an empty ornament, so that menu items are always aligned, even when radio items are used. However radio items are fairly rare, so most of the time we end up with an extra margin with no purpose. The design team now prefers radio items to only align with each other, so that regular items get the expected margin. Change the defaults accordingly. Part-of: --- js/ui/popupMenu.js | 2 +- js/ui/status/bluetooth.js | 1 - js/ui/status/network.js | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 7b876ed24..ff503a142 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -96,7 +96,7 @@ var PopupBaseMenuItem = GObject.registerClass({ this._ornamentIcon = new St.Icon({style_class: 'popup-menu-ornament'}); this.add(this._ornamentIcon); - this.setOrnament(Ornament.NONE); + this.setOrnament(Ornament.HIDDEN); this._parent = null; this._active = false; diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js index 4ab716a0c..8588dbb87 100644 --- a/js/ui/status/bluetooth.js +++ b/js/ui/status/bluetooth.js @@ -257,7 +257,6 @@ class BluetoothToggle extends QuickMenuToggle { ellipsize: Pango.EllipsizeMode.NONE, line_wrap: true, }); - this._placeholderItem.setOrnament(PopupMenu.Ornament.HIDDEN); this.menu.addMenuItem(this._placeholderItem); this._deviceSection.actor.bind_property('visible', diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 000279e85..eee89d021 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -244,7 +244,6 @@ const NMSectionItem = GObject.registerClass({ // Turn into an empty container with no padding this.styleClass = ''; - this.setOrnament(PopupMenu.Ornament.HIDDEN); // Add intermediate section; we need this for submenu support this._mainSection = new PopupMenu.PopupMenuSection(); -- 2.39.5